package com.cd.service.cooperation.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cd.bean.Cooperation;
import com.cd.dao.CooperationMapper;
import com.cd.service.cooperation.CooperationService;

/**
 *合作交流
 *@Author zhk
 *@Date 2017-12-20
 **/
@Service("cooperationService")
public class CooperationServiceImpl implements CooperationService{

	@Autowired
	CooperationMapper cooperationMapper;

	@Override
	public void save(Cooperation coo) throws Exception {
		cooperationMapper.save(coo);
	}

	@Override
	public void delete(Integer id) throws Exception {
		cooperationMapper.delete(id);
	}

	@Override
	public void edit(Cooperation coo) throws Exception {
		cooperationMapper.update(coo);
	}

	@Override
	public List<Cooperation> listAll() throws Exception {
		return cooperationMapper.queryByList();
	}

	@Override
	public Cooperation findById(Integer id) throws Exception {
		return cooperationMapper.query(id);
	}

	@Override
	public void deleteAll() throws Exception {
	
	}

	@Override
	public Integer size() throws Exception {
		// TODO Auto-generated method stub
		return cooperationMapper.getCount();
	}

	@Override
	public List<Cooperation> listLimit() throws Exception {
		// TODO Auto-generated method stub
		return cooperationMapper.list();
	}
	
	
	
	
	
}
